<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>异步执行</title>
    <script type="text/javascript">
        setTimeout(function () {
            console.log(1)
        }, 0);  // 异步执行，首先执行log(2)，再执行log(1)
        console.log(2);
    </script>
</head>
<body>

</body>
</html>